//
//  URL+Extent.swift
//  LeTu
//
//  Created by gy on 2023/12/27.
//

import Foundation

extension URL {
    static func encodedURL(string: String) -> URL? {
        if let encodedString = string.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
            return URL(string: encodedString)
        }
        return nil
    }
}

